<template>
	<view>
		<view class="xm-flex-c xm-justify-center xm-align-content-center xm-brr-20rpx" style="background-color: #FFFFFF;width: 100%;height: auto;align-items: center;padding: 30rpx;">
			
			<input type="text" value="" v-model="user.user" placeholder="点击输入账号" style="margin-top: 230rpx;margin-bottom: 30rpx;width: 80%;border-bottom: 4rpx #4CD964 solid;padding: 15rpx;border-radius: 0rpx;padding-left: 20rpx;"/>
			
			<input type="text" value="" v-model="user.name" placeholder="点击输入昵称" style="margin-bottom: 30rpx;width: 80%;border-bottom: 4rpx #4CD964 solid;padding: 15rpx;border-radius: 0px;padding-left: 20rpx;"/>
			
			<input type="text" value="" v-model="user.password" placeholder="点击输入密码" style="margin-bottom: 30rpx;width: 80%;border-bottom: 4rpx #4CD964 solid;padding: 15rpx;border-radius: 0rpx;padding-left: 20rpx;"/>
		
			<input type="text" value=""  v-model="user.teleplonne" placeholder="请输入电话号码" style="margin-bottom: 30rpx;width: 80%;border-bottom: 4rpx #4CD964 solid;padding: 15rpx;border-radius: 0rpx;padding-left: 20rpx;"/>
			<view class="xm-but" @click="getRig" hover-class="but-selct" style="text-align: center;width: 70%;height: 70rpx;line-height: 70rpx;border-radius: 20rpx;margin-top: 60rpx;color: #FFFFFF;margin-bottom: 300rpx;">
				注册
			</view>
			
			<!-- <view class="xm-flex-r xm-justify-between" style="align-items: center;width: 90%;margin-top: 30rpx;margin-bottom: 300rpx;" >
				<view class="xm-fontsize-15" style="color: #555555;">
					忘记密码
				</view>
				<view class="xm-fontsize-15" style="color: #555555;">
					注册用户
				</view>
			</view> -->
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				user:{
					user:"",
					name:"",
					password:"",
					teleplonne:""
				}
				
			}
		},
		methods: {
			getRig(){
				this.$http("http://127.0.0.1:4399/user/register","post",this.user,{
					'content-type': 'application/json'
				}).then(res=>{
					// console.log(res);
					if(res.code==0){
						this.$api.gotoType('back')
					}
					
				})
			}
		}
	}
</script>

<style>
	page{
		background-color:#C0C0C0;
		box-sizing: border-box;
		padding: 30rpx;
	}

.xm-but{
	background:linear-gradient(to right,#26acd4,#d6d6d6);
}
</style>
